//
//  ViewController.swift
//  UITextView设置输入视图_Swift
//
//  Created by YYY on 2017/9/5.
//  Copyright © 2017年 成品家（北京）网路科技有限公司. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var textView: UITextView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        
        let view = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 258))
        view.backgroundColor = UIColor.green
        //设置输入键盘视图
        textView.inputView = view
        
        let toolBar = UIToolbar(frame: CGRect(x: 0, y: 0, width: 200, height: 44))
        //设置输入助理视图,键盘消失，助理视图随之消失
        textView.inputAccessoryView = toolBar
        
        //刷新输入键盘视图
        textView.reloadInputViews()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

